package com.stm.bi.api;

import com.stm.framework.dto.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import com.stm.bi.dto.query.SubjectListQry;
import com.stm.bi.api.fallback.SubjectFallbackFactory;
import com.stm.bi.dto.vo.SubjectVO;

import java.util.List;

/**
 * 科目RPC服务
 * @author qinyongjie
 * @date 2025-05-22
 */
@FeignClient(contextId = "subjectRemoteService", value = "saas-bi",fallbackFactory = SubjectFallbackFactory.class)
public interface SubjectRemoteService {

    /**
    * 科目详细查询
    */
    @GetMapping(value = "/rpc/subject/{id}")
    public Response<SubjectVO> selectById(@PathVariable("id") Long id);


    /**
    * 科目列表查询
    */
    @GetMapping(value = "/rpc/subject/selectList")
    public Response<List<SubjectVO>> selectList(@SpringQueryMap SubjectListQry subjectListQry);

}
